package edu.ccut.saturn.studio.wfg.dialog;

import java.util.List;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

public class TableViewerContentProvider implements IStructuredContentProvider {

	public Object[] getElements(Object inputElement) {
		if (inputElement instanceof List) {
			return ((List<?>)inputElement).toArray(); //将数据集转换为数组
		} else {
			return new Object[0];
		}
	}

	public void dispose() {	
	}

	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
	}
}
